//
//  BlueToothManager.h
//  xy_hehu
//
//  Created by pac on 2019/4/28.
//  Copyright © 2019 pac. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CoreBluetooth/CoreBluetooth.h>
#import "NSString+BluseStr.h"
#import "NSData+Crc16.h"
#import "BlueToothFile.h"
#import <SVProgressHUD.h>
#import "Project_ElectCheckSumModel.h"

@protocol BlueToothManagerDelegate <NSObject>



/*
 0连接上设备
 1赋值功能连接好了
 2手机蓝牙断开（关闭了）
 3蓝牙设备断开连接
 4蓝牙搜索失败
*/
- (void)blueToothStateChangeWithTag:(NSInteger)tag;

- (void)blueToothMsgReturnWithStr:(NSString *)msgStr;

@end

@interface BlueToothManager : NSObject

///是否连接到设备蓝牙
@property (nonatomic,assign) BOOL isConnect;

@property (nonatomic,assign) BOOL isStart;//蓝牙是否正在运行

///
@property (nonatomic,strong) NSString * macAddress;

///
@property (nonatomic,assign) CBManagerState managerState;
///
@property (nonatomic,assign) id <BlueToothManagerDelegate> delegate;


+ (BlueToothManager *)shareBlueToothManager;
- (void)getBlueToothDefautSetting;
- (void)reConnect;
- (void)blueToolInit;
- (void)sendMessage:(NSString *)msg;




- (void)sendChufang:(NSString *)str;
- (void)getBlueToothState;
- (void)getBlueToothOff;



@end
